import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'

//使用mock假数据
import { viteMockServe } from "vite-plugin-mock"

//使用varlet组件库
import components from 'unplugin-vue-components/vite'
import { VarletUIResolver } from 'unplugin-vue-components/resolvers'

const path = require('path');

export default defineConfig({
  plugins: [
    vue(),
    viteMockServe({
      supportTs: true}),
    components({
      resolvers: [VarletUIResolver()]
    })
  ],
  resolve: {
    alias: {
      '@': path.resolve(__dirname,'./src')
    }
  }
})
